<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>可变颜色png</title>
  <style>
    .icon {
      display: inline-block;
      width: 20px;
      height: 20px;
      overflow: hidden;
    }

    .icon-del {
      background: url(delete.png) no-repeat center;
    }

    .icon>.icon {
      position: relative;
      left: -20px;
      /* 新版chrome内核可以不加这个透明border */
      /* border-right: 20px solid transparent; */
      -webkit-filter: drop-shadow(20px 0);
      /* drop-shadow里面给任何颜色都可以 */
      /* filter: drop-shadow(20px 0 red); */

      filter: drop-shadow(20px 0 blue);
    }
  </style>
</head>

<body>


  <p><strong>原始图标</strong></p>
  <i class="icon icon-del"></i>
  <p><strong>可以变色的图标</strong></p>
  <i class="icon"><i class="icon icon-del"></i></i>
</body>

</html>